<#include "../base.ftl"/>

<#macro title>
    资源管理
</#macro>

<#macro cssfile>
</#macro>

<#macro scriptfile>
</#macro>

<#macro breadcrumb>
    <ul class="breadcrumb">
     <li><a href="index.html">Home</a> <span class="divider">/</span></li>
     <li class="active">资源管理</li>
    </ul>
</#macro>

<#macro main>
    <table id="gridTable"></table>
    <div id="gridPager"></div>
</#macro>

<#macro jsscript>
jQuery(document)  
.ready(  
        function() {  
            jQuery("#gridTable")  
                    .jqGrid(  
                            {  
                                url : 'list/admin/resourceList/list.html',  
                                editurl : 'operator/data/TResources/operator.html',  
                                datatype : "json",  
                                mtype : 'POST',  
                                height : 400,  
                                colNames : [ "资源ID","资源名称","资源描述","资源类型","优先级", "资源内容" ],  
                                colModel : [ { 
                                        name : 'resId', 
                                        jsonmap : 'RES_ID', 
                                        index : 'RES_ID', 
                                        hidden: true, 
                                        editable: false, 
                                        search : false 
                                        },{ 
                                        name : 'resName', 
                                        jsonmap : 'RES_NAME', 
                                        index : 'RES_NAME', 
                                        editable: true,
                                        searchoptions : { sopt : [ "eq", "cn" ] },    search : true 
                                        },{ 
                                        name : 'resDesc', 
                                        jsonmap : 'RES_DESC', 
                                        index : 'RES_DESC', 
                                        editable: true,
                                        searchoptions : { sopt : [ "eq", "cn" ] },    search : true 
                                        },{ 
                                        name : 'resType', 
                                        jsonmap : 'RES_TYPE', 
                                        index : 'RES_TYPE', 
                                        editable: true,
                                        searchoptions : { sopt : [ "eq", "cn" ] },    search : true 
                                        },{ 
                                        name : 'resPriority', 
                                        jsonmap : 'RES_PRIORITY', 
                                        index : 'RES_PRIORITY',
                                        editable: true,
                                        searchoptions : { sopt : [ "eq", "cn" ] },    search : true 
                                        },{ 
                                        name : 'resContent', 
                                        jsonmap : 'RES_CONTENT', 
                                        index : 'RES_CONTENT',
                                        editable: true, 
                                        searchoptions : { sopt : [ "eq", "cn" ] },    search : true 
                                        }],  
                                sortname : 'RES_NAME',  
                                sortorder : 'asc',  
                                viewrecords : true,  
                                gridview : true,  
                                autowidth : true,  
                                rowNum : 20,  
                                rowList : [ 10, 20, 30 ],  
                                pager : jQuery('#gridPager'),  
                                jsonReader : {  
                                    page : "page.pageNo",  
                                    total : "page.totalPages",  
                                    records : "page.totalCount",  
                                    root : "page.result",  
                                    repeatitems : false,  
                                    id : 'RES_ID'  
                                },      
                                prmNames : {  
                                    rows : "page.pageSize",  
                                    page : "page.pageNo",  
                                    sort : "page.orderBy",  
                                    order : "page.order"  
                                },  
                                pager : "#gridPager",  
                                caption : "资源列表"  
                                }).navGrid('#gridPager', {  
                                    edit : true,  
                                    add : true,  
                                    del : true,  
                                    search : true  
                                }, {  
                                        //edit  
                                        beforeShowForm : function(form) {  
                                        },  
                                        reloadAfterSubmit : true,  
                                        closeAfterEdit : true, //修改完毕后关闭  
                                        afterComplete : opertaionPrompt  
                                    }, {  
                                        //add  
                                        beforeShowForm : function(form) {  
                                        },  
                                        reloadAfterSubmit : true,  
                                        closeAfterAdd : true, //新增完毕后关闭  
                                        afterComplete : opertaionPrompt  
                                    }, {  
                                        //del  
                                        reloadAfterSubmit : true,  
                                        afterComplete : opertaionPrompt  
                                    }, {  
                                        //组合查询  
                                        multipleSearch : true  
                                    });  
                                }); 
</#macro>